package com.liveinstars.im.api;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class NotifyData {

    /**
     * 发送人id
     */
    private final Long userId;
    /**
     * 发送到的人id，如果是发群，就是chatgoupid不为0，那么这个为0
     */
    private final Long toId;
    /**
     * 发送内容
     */
    private final String content;
    /**
     * 发送到的群id
     */
    private final Long chatGroupId;
    /**
     * 如果true的话，可以发送给群里的一个人
     */
    private boolean onlyOne = false;

    public NotifyData(Long userId, Long toId, String content, Long chatGroupId) {
        this.userId = userId;
        this.toId = toId;
        this.content = content;
        this.chatGroupId = chatGroupId;
    }

    public NotifyData(Long userId, Long toId, String content, Long chatGroupId, boolean only) {
        this.userId = userId;
        this.toId = toId;
        this.content = content;
        this.chatGroupId = chatGroupId;
        this.onlyOne = only;
    }
}
